home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
tshare.arc
/
NEW14H.DOC
< prev
next >
Wrap
Text File
|
1985-10-25
|
13KB
|
321 lines
/==========\
| NEW14H | (2.7)
\==========/
Marty Ross
c/o Computing Resource Center
10801 National Blvd., Third Floor
Los Angeles, CA 90064
Release: 2.7, 10/18/85
By: Marty Ross, at the Computing Resource Center
System: IBM-PC with standard communications adapter (COM1: or COM2:)
Requirements: Tested using PC-DOS 2.0/2.1/3.1, 128K or larger PC preferred.
Abstract: NEW14H is a DOS-extension (resident program) which intercepts
calls made to the BIOS communication application interrupt
(INT 14H), and adds extended functions to the communication
repertoire. The program maintains a 32K input buffer, and
a 255 byte output buffer, and uses both input and output
hardware interrupts for maximum efficiency.
If none of this makes any sense, then you don't need NEW14H
unless you are using application software which requires it,
sich as TSHARE, the background terminal emulator driver.
NEW14H is of primary interest to communication software
developers only.
Distribution: I am distributing this preliminery version freely, in hopes to
stimulate interest and feedback. No fee may be charged for its
distribution, and this document must accompany the programs
documented herein.
Features: NEW14H provides a more accurate way to read characters from
the communication port. The application program need not
keep up on a character basis with the incoming data: a 32K
circular input buffer is used and always updated while any
normal PC software executes. If NEW14H is installed on two
ports, then each port has 32K input buffer so is independant
from the other device. See extended function calls in .ASM
excerpt for details on extended functions provided by NEW14H.
Usage: There are three steps necessary to activate NEW14H so that
it may be used to by application software:
1.) Initialize DOS
2.) Install the NEW14H communication enhancements
4.) Initialize the COM: port for desired baud/parity
(NEW14H DOES NOT DO THIS: USE PC-DOS "MODE.COM")
A typical installation sequence (which can be combined into
a .BAT file, such as "AUTOEXEC.BAT"):
+---------------------------------------------------------+
| |
(1) | <ALT>+<CTL>+<DEL> ... |
| |
| IBM Disk Operating System |
| Version x.xx ... |
| |
(2) | A>new14h |
| NEW14H - 2.x - (C) Copyright 1985, by Marty Ross |
| Auxiliary COM1: port driver active. |
| |
(3) | A>mode com1:300,n,8 |
| COM1:300,n,8,- |
| |
| A>_ |
| |
+---------------------------------------------------------+
Why NEW14H?: NEW14H was written because the BIOS counterpart is severely
deficient, and does not even use the powerful interrupt cap-
abilities on the communication devices used in the IBM-PC.
NEW14H intercepts the common call made to the BIOS services
for async communication, and although not tested for transp-
arency, was modeled after the old INT 14H so that existing
application software can take advantage of the enhancements
provided without modification. Additional calls provided by
NEW14H also add a degree of power to the INT 14H system inter-
rupt which software developers can use for convenience, and
power which previously was possible only by taking care of
all the details of communication themselves, detracting from
their overall purpose.
Disclaimer: Though I've tested NEW14H under varying conditions, I cannot
guarantee that it will work in every case/PC configuration.
Also, I suggest you use caution when using NEW14H in new
situations (on two ports, etc): I will not be liable for any
damage caused by NEW14H, but would like to be informed if any
undesireable interactions occur. Please write me.
On-line help: For on-line info, type "NEW14H ?" which will cause the following
display:
+----------------------------------------------------------------------+
| syntax: |
| new14h [port#] |
| port#: |
| 1 - COM1: |
| 2 - COM2: |
| |
| You can use the PC-DOS "MODE" command to initialize |
| or change the channel baud rate, and parity settings |
| (e.g. "MODE COM1:300,E,7"). |
| |
| The communication channel will occupy approximately |
| 33K of memory, and will remain active until CTL-ALT-DEL. |
| |
+----------------------------------------------------------------------+
which indicates that you may install NEW14H on either the COM1: or
the COM2: port by specifying the port number.
NOTE: As indicated above, NEW14H does not automatically initialize
the selected communication port for baud rate or parity set-
tings. Use the DOS 'MODE' command for this purpose BEFORE
attempting to use the port for communication.
About the Author:
Marty Ross is a consultant for the Computing Resource Center,
a data processing firm in Los Angeles. CRC uses the IBM VM/SP
operating system to provide its clients with an interactive
method to access popular mainframe data handling facilities,
such as SAS, PL/1, FORTRAN, and the On-Line Data System,
CRC's own database management product. For microcomputers,
CRC has released a Statistics/Data Analysis and Graphics
package for the IBM-PC called STATA, the Data Tool, which
features standard statistical (regression) analyses, excellent
data handling capabilities, and a wide variety of experimental
data analysis techniques with STATA/Graphics. If you are
interested in obtaining a DEMO copy of STATA, please call CRC
on their toll-free number: 1-800-782-8272 outside California,
or dial them directly at (213) 470-4341. Be sure to tell them
that Marty sent you!
Technical specs: (excerpt from source program):
----------------
TITLE NEW14H - Enhanced communications driver for COM adapter
SUBTTL Copyright (C) 1985 by Marty Ross
PAGE 66,132
; last mod 10/21/85 - new function x'90': "enable_ints"
;
; NEW14H - Replacement driver for PC BIOS INT 14 call.
;
; Defines interrupt driver COMmunication "channel," and intercepts
; INT 14H for UART INIT, character READ/WRITE, and other added functions.
;
; NOTE: This version supports only one buffer configuration:
;
; 256 byte OUTPUT buffer
; 32K byte INPUT buffer
;
; Both lists are treated as circular character lists, and an error
; return is indicated for output overflow by the TIMEOUT BIT, and
; and the value EOF in AL. Application must process incoming data
; fast enough so as not to allow more than 32K (size of input buffer)
; of data to remain un-processed (READ via RECV_CODE function call).
;
; functions intercepted (replaced):
;
; code(AH) function added feature(s)
;
; 0 INITIALIZE UART Re-enables interrupt system
; 1 SEND CHARACTER Interrupt driven, buffered.
; 2 RECEIVE CHARACTER Interrupt driven, buffered.
; NOTE: will HANG for TIMEOUTCNT
; 3 RETURN MSR & LSR
;
; as with old NEW14H, B7 of AH returned is timeout bit (as per TIMEOUTCNT),
; and AH will always return with value of line status (bits 0-6).
;
; added functions:
;
; 80h RETURN VERSION NUMBER OF THIS DRIVER IN AH, AL.
; MAJOR VERSION # WILL NOT EXCEED 9, SO IF AH RETURNS
; WITH VALUE > 9, THIS PROGRAM IS NOT INSTALLED AND
; 'ADDED' SUB-FUNCTIONS (BELOW) SHOULD NOT BE USED.
; 84h RETURN SIZE OF COMMUNICATION BUFFER
; 85h FLUSH COMMUNICATION BUFFER
; 86h CHECK FOR ANY CHARACTERS IN BUFFER/RETURN Z IF NONE
; IF CHAR(S) EXIST, FIRST CHAR RETURNED IN AL
; 87h SEND BREAK SIGNAL OVER SELECTED PORT
; 88h RETURN 0 in AX if no chars in buffer, else non zero
; 89h Re-ENABLE interrupts (after initializing baud rate)
; (since we don't intercept SET BAUD RATE function,
; must use BIOS' which disables our interrupts!).
; 8AH This call allows caller to predict whether I/O is
; currently taking place (at the device level). If
; char(s) received since last call, AL will be NZ.
; 8BH This call sets or resets an ALARM feature which causes
; the IBM-PC (BIOS) BELL to ring when a control-G ASCII
; character is read from the communication line.
; (AL=0 means TURN ALARM OFF, AL!=0 means TURN ALARM ON)
; 8CH Pass non zero value back in AL if exist characters in
; the output queue.
; 8DH Read the value at the UART port offset from base port
; (offset given in AL, i.e. - COM1: base=3F8), value is
; returned in DL.
; 8EH Write the UART port (offset from base port given in AL),
; value to be written is passed in DL.
; 8FH Set or reset XON/XOFF protocol.
; AL=0 Means RESET, non zero AX means SET
; 90H Force enabling the interrupts, similar to 89H but not
; as extensive; only does OUT ier,INT_TYPS
;
; DX must contain PORT # (0,1 valid).
; I.E. 0=COM1, 1=COM2, etc.
----------------------------
[1] NEW14H will be destroyed by programs such as BASIC or BASICA which
re-define the communication interrupt driver(s).
------------------------------------------------------------------------------
/==========\
| NEW14H | (2.7)
\==========/
Marty Ross
c/o Computing Resource Center
10801 National Blvd., Third Floor
Los Angeles, CA 90064
Release: 2.7, 10/18/85
Comments?
Can you use NEW14H?
Name: _________________________________________________________
Address: _________________________________________________________
_________________________________________________________
_________________________________________________________
---------------------------------------------------------
Comments: _________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________
If you feel NEW14H contributes to your effectiveness, then please let
me know by sending a donation of $10.00 or whatever you feel is ap-
propriate. NEW14H was developed in my spare time, and is now not a
commercial effort of CRC. I will continue to develop products like
NEW14H for those who show interest - provided I can afford it. Users
who make contributions will be entitled to a single sided diskette
of other PC-DOS utilities I've developed while at CRC: please include
your name and return address when sending donations!
P.S. - If it's the $10.00 that's keeping your from filling out &
sending this sheet, forget about the money! I'd like to
hear your comments!
(0,1 valid).
; I.E. 0=COM1, 1=COM2, etc.
;
; Start of program; definitions:
;
; First set; potentially user-modifyable definitions:
;
main_version equ 2 ; version number - do NOT exceed 9 !!
sub_version equ 7 ; release number - " " " " !!!
intcom1_name equ 1 ; our name (if we are COM1) is 1
intcom2_name equ 2 ; our name (if we are COM2) is 2
EOF equ 0FFh ; EOF return value; may wish to use ESC, (1AH)
buffer_size equ 32767 ; Size (chars) of input buffer
xbuffer_size equ 256 ; Size (chars) of output buffer
read_id equ 80h ; 'added' INT14H calls - IDentify self call.
length_code equ 84h ; 'added' call - get buffer length
flush_code equ 85h ; added flush buffer call.
chkbuf_code equ 86h ; added check buffer call
break_code equ 87h ; added send break signal over line call
bf_hit equ 88h ; added 'chars in buffer' ? call
reset_ints equ 89h ; added 'reset interrupts' call
c_activity equ 8Ah ; added 'active since last call?' call
alarm_code equ 8Bh ; added 'set alarm' call
oq_empty equ 8Ch ; added 'output queue empty ?' call
read_port equ 8Dh ; added 'read port' call
write_port equ 8Eh ; added 'write port' call
setxon equ 8Fh ; added 'set xon/xoff mode' call
enable_ints equ 90h ; added 'reset ier' call
default_port equ 0 ; default to COM1: when no parameters supplied
MSCOUNT equ 500 ; we want timer to be ~ 500 ms (for BRK signl)
MSSIZE equ 70 ; MSSIZE should be set to produce 1 ms loop.
TIMEOUTCNT equ 65500 ; # of loops before giving